import React from 'react'
import stores from '../Store'
import { observer, inject } from 'mobx-react'

@inject('stores')
@observer
class Home extends React.Component {

    onClicks = () => {
        let value = stores.state.routerIndex + 1
        stores.state.setRouterIndex(value)
    }

    render() {
        let a = stores.state.isHome
        return (
            <div>
                hello  webpack !!!
                <p>routerIndex：{stores.state.routerIndex}</p>
                <p>是否等于0:{a + ''}</p>
                <button onClick={this.onClicks}>+1</button>
            </div>

        )
    }
}
export default Home